import request from '@/utils/request'
// 获取文章分类
export const channelCateService = () => {
  return request.get('/my/cate/list')
}

// 添加文章分类
export const channelAddCateService = (channelForm) => {
  const cate_name = channelForm.cateName
  const cate_alias = channelForm.cateAlias
  return request.post('/my/cate/add', {
    cate_name,
    cate_alias
  })
}

// 更新文章分类
export const channelUpdateCateService = (channelForm) => {
  const cate_name = channelForm.cateName
  const cate_alias = channelForm.cateAlias
  const id = channelForm.id
  return request.put('/my/cate/info', {
    id,
    cate_name,
    cate_alias
  })
}

// 删除文章分类
export const channelDeleteCateService = (id) => {
  return request.delete(`/my/cate/del?id=${id}`)
}
